const path = require('path')
const os = require('os')
function getIcon(){
  switch (os.platform()) {
    case 'win32':
      return path.join(__dirname, '../bin/icons/icon.ico')
    case 'darwin':
      return path.join(__dirname, '../bin/icons/icon.icns')
    case 'linux':
    default:
      return path.join(__dirname, '../bin/icons/icon.png')
  }
}
const WINDOW_CONFIG = {
  LOGIN_WINDOW: {
    width: 400,
    height: 490,
    resizable: false,
    frame: false,
    backgroundColor: '#fff',
    fullscreenable: false,
    titleBarStyle:'hidden',
    webPreferences: {
      nodeIntegration: true,
      preload: path.join(__dirname, '../polyfill/preload.js')
    },
    icon:getIcon()
  },
  MAIN_WINDOW: {
    width: 1280,
    minWidth: 800,
    height: 720,
    minHeight: 600,
    frame: true,
    show: true,
    backgroundColor: '#f8f8f8',
    autoHideMenuBar: true,
    fullscreenable: false,
    title: '药学微生物智慧采集筛选分析信息系统',
    webPreferences: {
      nodeIntegration: true,
      webSecurity:false,
      preload: path.join(__dirname, '../polyfill/preload.js')
    },
    icon:getIcon()
  }
}
module.exports = {
  WINDOW_CONFIG
}
